<?php

function getLtiString($ltiDelisting) {
	$result = "<b>" . $ltiDelisting->coachName . "</b>";
	if ($ltiDelisting->reasonType == TradeType::Lti) {
		$result .= " put ";
	}
	else if ($ltiDelisting->reasonType == TradeType::Spud) {
		$result .= " spudded ";
	}
	else {
		$result .= " traded(" . $ltiDelisting->reasonType . ") ";
	}
	$result .= getPlayerDisplayForPlayer($ltiDelisting->playerOne);
	if ($ltiDelisting->reasonType == TradeType::Lti) {
		$result .= " on the LTI list for ";
	}
	else {
		$result .= " for ";
	}
	$result .= getPlayerDisplayForPlayer($ltiDelisting->playerTwo);
	if ($ltiDelisting->source != null) {
		$result .= " " . "<a href='" . $ltiDelisting->source . "'>source</a>";
	}

	return $result;	
}

function getLtiStringForForum($ltiDelisting) {
	$result = "[b]" . $ltiDelisting->coachName . "[/b]";
	if ($ltiDelisting->reasonType == TradeType::Lti) {
		$result .= " put ";
	}
	else if ($ltiDelisting->reasonType == TradeType::Spud) {
		$result .= " spudded ";
	}
	else {
		$result .= " traded(" . $ltiDelisting->reasonType . ") ";
	}
	$result .= getPlayerDisplayForForum($ltiDelisting->playerOne);
	if ($ltiDelisting->reasonType == TradeType::Lti) {
		$result .= " on the LTI list for ";
	}
	else {
		$result .= " for ";
	}
	$result .= getPlayerDisplayForForum($ltiDelisting->playerTwo);
	if ($ltiDelisting->source != null) {
		$result .= " " . "[url=" . $ltiDelisting->source . "]source[/url]";
	}

	return $result;	
}

?>
